In a flip chip package with a semiconductor chip being a heat-generating object, a thermal interface material (TIM) is usually used to fill the gap between the flip chip and a heat-dissipating object, like a lid or a heat sink for transferring the heat from one to the other. The types of the TIM basically include thermal pad, thermal grease, phase change material and liquid metal. A good TIM needs to have 1) a high thermal conductivity, 2) a good surface wetting capability for reducing the thermal contact resistance, 3) a good gap filling capability, and 4) a good thermal reliability in test or application. A liquid metal as TIM usually includes gallium and gallium alloy. The melting point of the gallium is about 29° C., and that of gallium alloy is even lower. The thermal conductivity of the liquid metal is much higher than the extensively used thermal pad or thermal grease. Furthermore, a liquid metal has much better capability for surface wetting and gap filling. So, of all the types of TIM, a liquid metal is an ideal TIM if only looking at the first three items. If a liquid metal can be used in a lidded flip chip package, the temperature of the lidded flip chip package can be reduced significantly as compared to other types of TIM. However, the conventional lidded flip chip packages based on a conventional lid of prior arts are limited to use a liquid metal as its TIM due to the pumping-out issue, that is, when the package is under a thermal cycling test or in its long term of application, the volume of the gap between the flip chip and the lid varies with temperature due to the warpage of the flip chip, causing the liquid metal TIM to be pumped out. The TIM pumping-out issue will cause an incomplete gap filling between the flip chip and the lid, reducing the thermal performance of TIM. And the more important thing is that because a liquid metal is electrically conductive, a small amount of TIM pumping-out may damage the whole electronic device. As a result, a liquid metal type of TIM has not been commercially used in a lidded flip chip package. In general, because of the similar reason, a liquid metal type of TIM is rarely interposed between a heat-dissipating object (a heat sink, for example) and a heat-generating object (a semiconductor chip, for example) in an electronic device.